🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / app / src / main / java / com / geeksville / mesh / android / DebugLogFile.kt
Displaying Raw • Download
app/src/main/java/com/geeksville/mesh/android/DebugLogFile.kt 1c3784235e7e20ed88e054097d2e7addbff92dc3 (1c378423) Text, 1.62 KB
T8b949e/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787com.geeksville.mesh.android
Tff7b72import T7ee787android.content.Context
Tff7b72import T7ee787java.io.File
Tff7b72import T7ee787java.io.FileOutputStream
Tff7b72import T7ee787java.io.PrintWriter
T8b949e/**
* Create a debug log on the SD card (if needed and allowed and app is configured for debugging (FIXME)
*
* write strings to that file
*/
Tff7b72class T56d364DebugLogFileTb4b4b4(Te6edf3contextTb4b4b4: Te6edf3ContextTb4b4b4, Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3stream Tff7b72= Te6edf3FileOutputStreamTb4b4b4(Te6edf3FileTb4b4b4(Te6edf3contextTb4b4b4.Te6edf3getExternalFilesDirTb4b4b4(Tff7b72nullTb4b4b4)Tb4b4b4, Te6edf3nameTb4b4b4)Tb4b4b4, Tff7b72trueTb4b4b4)
Tff7b72val Te6edf3file Tff7b72= Te6edf3PrintWriterTb4b4b4(Te6edf3streamTb4b4b4)
Tff7b72fun Td2a8ffcloseTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3fileTb4b4b4.Te6edf3closeTb4b4b4(Tb4b4b4)
Tb4b4b4}
Tff7b72fun Td2a8fflogTb4b4b4(Te6edf3sTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4{
Te6edf3fileTb4b4b4.Te6edf3printlnTb4b4b4(Te6edf3sTb4b4b4) T8b949e// FIXME, optionally include timestamps
Te6edf3fileTb4b4b4.Te6edf3flushTb4b4b4(Tb4b4b4) T8b949e// for debugging
Tb4b4b4}
Tb4b4b4}
T8b949e/**
* Create a debug log on the SD card (if needed and allowed and app is configured for debugging (FIXME)
*
* write strings to that file
*/
Tff7b72class T56d364BinaryLogFileTb4b4b4(Te6edf3contextTb4b4b4: Te6edf3ContextTb4b4b4, Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4) Tb4b4b4:
Te6edf3FileOutputStreamTb4b4b4(Te6edf3FileTb4b4b4(Te6edf3contextTb4b4b4.Te6edf3getExternalFilesDirTb4b4b4(Tff7b72nullTb4b4b4)Tb4b4b4, Te6edf3nameTb4b4b4)Tb4b4b4, Tff7b72trueTb4b4b4) Tb4b4b4{
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.05s